package day03;
//运算符的演示
public class OpenDemo {
    public static void main(String[] args) {

        int num=5;
        int flag=num>0?1:-1;
        System.out.println(flag);

        int a=8,b=5;
        int max=a>b?a:b;
        System.out.println("max="+max);









/*
        System.out.println(10+20+""+30);//3030,,,,,,,,字符串
        System.out.println(""+10+20+30);//102030,,,,,,,,字符串
        System.out.println(10+20+30+"");//60,,,,,,,,字符串

*/
        /*
        int age=28;
        System.out.println("age=");
        System.out.println(age);
        System.out.println("age="+age);
        System.out.println("我的年龄是"+age);
        System.out.println("我今年"+age+"岁了");

        String name="LRY";
        System.out.println("name"+name);
        System.out.println("大家好，我叫"+name);
        System.out.println("大家好，我叫"+name+"，今年"+age+"岁了");
        /*



        /*
        short s=5;
        //s=s+10;//编译错误，需改为；s=(short)(s+10)
        s+=10;//正确，相当于s=(short)(s+10)



        int a=5;
        a+=10;//相当于a=（int）（a+10）
        System.out.println(a);//15
        a*=2;//相当于a=（int）（a*2）
        System.out.println(a);//30
        a/=6;//相当于a=（int）（a/6）
        System.out.println(a);//5


         */


        /*
        int a=5,b=10,c=5;
        boolean b3=a>b && c++>2;
        System.out.println(b3);//false
        System.out.println(c);//5,第一条件满足条件发生短路


        boolean b4=c<b||a++>2;
        System.out.println(b4);//true
        System.out.println(a);//5,第一条件满足条件发生短路



         */
        /*
        boolean b1=b>=a && b<c;
        System.out.println(b1);
        System.out.println(b>=a || b<c);//true||fales=true
        System.out.println(b<=c || b>a);//false||true=true
        System.out.println(b!=c || a<b);//true||true=true
        System.out.println(a==b || c>b);//false||false=false

        boolean b2=!(a<b);
        System.out.println(b2);//!true=false
        System.out.println(!(a>b));//!fales=true



         */



        /*
        int a=5,b=10,c=5;
        boolean b1=b>=a && b<c;
        System.out.println(b1);
        System.out.println(b<=c && b>a);
        System.out.println(a==b && c>b);
        System.out.println(b!=c && a<b);
        */



        /*

         int a=5,b=10,c=5;
         boolean b1=a>b;
        System.out.println(b1);//f
        System.out.println(c<b);//t
        System.out.println(a>=c);//t
        System.out.println(a<=b);//t
        System.out.println(a==c);//t
        System.out.println(a!=c);//f
        System.out.println(a+c>10);//f
        System.out.println(a%2==0);//f
        System.out.println(c++>5);//f
        System.out.println(c++>5);//t


         */



        /*
        int a=5,b=5;
        a++;
        b++;
        System.out.println(a);
        System.out.println(b);

         */
        /*
        int a=5,b=5;
        int c=a++;
        int d=++b;
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);


         */

    }
}
